money = 1000
import time
import random

while money > 0:
    print(f'您的总金有{money}元')
    wager = int(input('请下注：'))
    number =  random.randint(1, 6) + random.randint(1, 6)
    for _ in range(2):
        time.sleep(1)
    print(f'第1次点数为:{number}')
    is_fail = 0
    counter = 0
    while is_fail == 0:
        if counter ==0:
            match number:
                case 7|11:is_fail = 1
                case 2|3|12:is_fail = -1
        else :
            next_number= random.randint(1, 6) + random.randint(1, 6)
            for _ in range(2):
                time.sleep(1)
            print(f'第{counter+1}次点数为:{next_number}')
            if next_number == number:
                is_fail = 1
            elif next_number ==7:
                is_fail = -1
        counter += 1
    if is_fail == 1:
        print('你胜')
        money += wager
    elif is_fail == -1:
        print('庄家胜')
        money -= wager